<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <s:head theme="ajax"/>
    <title>My JSP 'insertUser.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="../css/register.css">
	<script type="text/javascript" src="../js/register.js"></script>
  </head>
  
  <body onload="initEvent()">
    	<s:tabbedPanel id="container" doLayout="true" theme="ajax">
    		<s:url id="insert" action="laborc/insert.action"></s:url>
    		<s:div label="导入学生" theme="ajax" cssClass="userDiv">
    			<div id="studentTip" class="tip"></div>
    			<div>
    			<s:form cssClass="userForm" id="studentForm" onsubmit="return checkStudent()">
    				<s:textfield label="学号" cssClass="userField" name="student.studentNum" id="sNum"></s:textfield>
    				<s:textfield label="姓名" cssClass="userField" name="student.name" id="sName"></s:textfield>
    				<s:textfield label="专业编号" cssClass="userField" name="student.professional.professionalNum" id="sProfessional"></s:textfield>
    				<s:textfield label="年纪" cssClass="userField" name="student.grade" id="grade"></s:textfield>
    				<s:textfield label="班级" cssClass="userField" name="student.classes" id="classes"></s:textfield>
    				<s:textfield label="手机" cssClass="userField" name="student.telephone" id="sTelephone"></s:textfield>
    				<s:textfield label="邮箱" cssClass="userField" name="student.email" id="sEmail"></s:textfield>
    				<s:textfield label="固定电话" cssClass="userField" name="student.fixedTelephone" id="sFixed"></s:textfield>
    				<s:hidden name="userType" value="0"></s:hidden>
    			</s:form>
    			</div>
    			<div>
    				<s:a href="%{insert}" cssClass="userSubmit" theme="ajax" formId="studentForm" targets="studentTip" loadingText="添加中...">添加</s:a>
    			</div>
    		</s:div>
    		<s:div label="导入老师" theme="ajax" cssClass="userDiv">
    			<div id="teacherTip" class="tip"></div>
    			<div>
				<s:form cssClass="userForm" id="teacherForm" onsubmit="return checkTeacher()">
					<s:textfield label="教工号" cssClass="userField" name="teacher.teacherNum" id="tNum"></s:textfield>
    				<s:textfield label="姓名" cssClass="userField" name="teacher.name" id="tName"></s:textfield>
    				<s:textfield label="研究所编号" cssClass="userField" name="teacher.institute.instituteNum" id="tInstitute"></s:textfield>
    				<s:textfield label="职称" cssClass="userField" name="teacher.teachersTitles" id="tTitle"></s:textfield>
    				<s:textfield label="研究方向" cssClass="userField" name="teacher.research" id="reaserch"></s:textfield>
    				<s:textfield label="手机" cssClass="userField" name="teacher.telephone" id="tTelephone"></s:textfield>
    				<s:textfield label="邮箱" cssClass="userField" name="teacher.email" id="tEmail"></s:textfield>
    				<s:textfield label="固定电话" cssClass="userField" name="teacher.fixedTelephone" id="tFixed"></s:textfield>
    				<s:hidden name="userType" value="1"></s:hidden>
				</s:form>
				</div>
				<div>
					<s:a  href="%{insert}" cssClass="userSubmit" theme="ajax" formId="teacherForm" targets="teacherTip" loadingText="添加中...">添加</s:a>					
				</div>
			</s:div>
    	</s:tabbedPanel>
  </body>
</html>
